'use strict';
var fs = require('fs');
// 写入文件
var rs = fs.createWriteStream('./2/stream/smpale.txt', 'utf-8')
rs.write('aaa\n');
rs.write('bb\n');
rs.write('小方方 \n');
rs.end()

// 拷贝文件
var p1 = fs.createReadStream('./2/stream/smpale.txt', 'utf-8')
var p2 = fs.createWriteStream('./2/stream/smpale2.txt', 'utf-8')
p1.pipe(p2)
